export interface User {
  id: number
  userName: string
  realName?: string
  email?: string
  phone?: string
  avatar?: string
  status: number
  lastLoginTime?: string
  lastLoginIp?: string
  remark?: string
  createTime: string
  updateTime?: string
  roleIds?: number[]
  roles?: Role[]
}

export interface Role {
  id: number
  roleName: string
  roleCode: string
  sort: number
  status: number
  remark?: string
  createTime: string
  updateTime?: string
}

export interface UserQuery {
  pageIndex?: number
  pageSize?: number
  userName?: string
  realName?: string
  email?: string
  status?: number
}

export interface CreateUserRequest {
  userName: string
  password: string
  realName?: string
  email?: string
  phone?: string
  status: number
  remark?: string
  roleIds?: number[]
}

export interface AssignUserRolesRequest {
  userId: number
  roleIds: number[]
}

export interface PagedResponse<T> {
  items: T[]
  total: number
  pageIndex: number
  pageSize: number
  totalPages: number
  hasPrevious: boolean
  hasNext: boolean
}